# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=jupyter-nbclient
pkgver=0.6.6
pkgrel=0
pkgdesc="Client library for executing notebooks"
url="https://github.com/jupyter/nbclient"
arch="noarch"
license="BSD-3-Clause"
depends="
	py3-jupyter_client
	jupyter-nbformat
	py3-nest_asyncio
	py3-traitlets
	"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-xmltodict jupyter-nbconvert py3-ipykernel"
options="!check" # circular dependency with jupyter-nbconvert
source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/nbclient/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/nbclient-$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest \
		--deselect nbclient/tests/test_client.py::TestExecute::test_widgets \
		--deselect nbclient/tests/test_client.py::test_run_all_notebooks
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
8ca0333a47920994d8afe7c8943b366d4669e7ad91daab1a36c57480b70e51dfd05c7cd44acd2a2005b8c0a6b41c4fe6be0fc22b75a3efe291e9c35dd334643c  jupyter-nbclient-0.6.6.tar.gz
"
